<?php

// Insert into SC_FORMULA (FORMULA_ID,SEQUENCE,TYPE,CODE,CLASS,DESCRIPTION,START_DATE,END_DATE,PCNT_TAX,LINE_ORDER)
//values (XX,1,'SHIPPING_COST','Example','CartWS_Model_FormulaEngine_Formula_Example','Costo de envio fijo $10',to_timestamp('16-SEP-09','DD-MON-RR HH.MI.SSXFF AM'),null,1,1000);

class CartWS_Model_FormulaEngine_Formula_Example extends CartWS_Model_FormulaEngine_Formula_Abstract {

    public function execute() 
    {
        $this->getOrder();
        $this->getOrderProperties();
        $lines = $this->getOrderLines();
        $line = $lines->current();
        $this->getOrderLineProperties( $line );
        $db = $this->getDbTable( 'CartWS_Model_Order' );
        $this->getDb();
        $this->getProperties();
        $this->getType();
        $this->getCode();
        $this->setMyAmount( $this->getMyAmount() + 10 );
        return true;
    }

}
